//These function of the code are all for guiding user's terminal parameters. 

#include <iostream>
#include <string.h>
#include "init.hpp"//Init user's code-house
using namespace std;

void helpwords(short option);

//The central parameters' guide function.
void paraguide(int argc , char *args[]){
    
    //Judge the quantity of the terminal parameters.
    switch (argc){
    case 1:
        helpwords(0);
        break;
    
    case 2:
        if( strcmp(args[1] , "help") == 0 ){
            helpwords(1);
        }
        else if(strcmp(args[1] , "init") == 0){
            init_center();
            
        } 
        else{
            helpwords(2);
        } 
        break;

    default:
        
        helpwords(2);
        break;

    }
}

//The terminal answer for user.
void helpwords(short option){
    switch (option){
    case 0://If there is no keyword but the args[0](ccw's name). 
        cout << "\033[36m" << "CCW: Please input keyword to do something" << "\033[0m" << endl;
        break;
    
    case 1://If there is only one keyword and it's "help".
        cout << "\033[36m" << "CCW: Okay,I can give you my hlep" << "\033[0m" << endl;
        cout << "\033[36m" << "\tInput \"ccw init\" to init your code-house" << "\033[0m" << endl;
        cout << "\033[36m" << "CCW: If you find out some bugs,you can email Hikarov at \"hikarov@yeah.net\" " << "\033[0m" << endl;
        break;    

    case 2://If the keywords are wrong.
        cout << "\033[36m" << "CCW: Cannot find this keyword you input" << "\033[0m" << endl;
        cout << "\033[36m" << "CCW: You can input \"ccw help\" to ask for my help" << "\033[0m" << endl;
        break;

    default:
        break;
    }
}